# Maintainer: Patrick von Reth <vonreth@kde.org>

_realname=snoregrowl
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
provides=("${MINGW_PACKAGE_PREFIX}-SnoreGrowl")
replaces=("${MINGW_PACKAGE_PREFIX}-SnoreGrowl")
pkgver=0.5.0
pkgrel=1
pkgdesc="A C and C++ library providing an api to use Growl notifications, based on the GNTP protocol (mingw-w64)"
arch=('any')
license=("BSD")
url="https://github.com/Snorenotify/Snorenotify"
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
             "${MINGW_PACKAGE_PREFIX}-cmake")
options=(!strip staticlibs !buildflags)
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/Snorenotify/${_realname}/archive/v${pkgver}.tar.gz")
sha256sums=('5180628ce1c732abfc1001db48302b0d63534a3d62dc50a4655e0b4675a918be')

build() {
  mkdir ${srcdir}/build-${MINGW_CHOST}
  cd ${srcdir}/build-${MINGW_CHOST}

  MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
  ${MINGW_PREFIX}/bin/cmake \
    -G"MSYS Makefiles" \
    -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
    -DCMAKE_BUILD_TYPE=Release \
    ../${_realname}-${pkgver}

  make # VERBOSE=1
}

package() {
  cd ${srcdir}/build-${MINGW_CHOST}
  make DESTDIR=${pkgdir} install
}
